int *g;
int g1[3];

void write() {
  g = &g1[2];
}

int main() {
  g1[0] = 1;
  g = &g1[0];
  write();
  g1[2] = 0;
  return *g;
}
